import QtQuick 2.0

Item {
    property alias txt: label.text
    property alias inputTxt: input.text
    id: inputBox
    // 默认大小
    width: 250
    height: 30
    Text {
        id: label
        width: inputBox.width * 0.3
        anchors.right: box.left
        color: "white"
        font {
            family: "Microsoft YaHei"
            pixelSize: 20
        }
        horizontalAlignment: Text.AlignRight
        text: "Label："
    }
    Rectangle {
        id: box
        width: inputBox.width * 0.7
        height: 30
        anchors.fill: parent
        border {
            color: "white"
            width: 2
        }
        TextInput {
            id: input
            anchors.fill: parent
            anchors.margins: 5
            font.pixelSize: 20
            verticalAlignment: TextInput.AlignVCenter
            focus: true
            clip: true
        }
    }
}
